home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Informant Complete 1995 - 2000
/
Delphi Informant Complete 1995 to 2000.iso
/
Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar
/
1998
/
Feb
/
di9802dm
/
treeview
/
TreeViewX_TLB.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-10-31
|
10KB
|
312 lines
unit TreeViewX_TLB;
{ This file contains pascal declarations imported from a type library.
This file will be written during each import or refresh of the type
library editor. Changes to this file will be discarded during the
refresh process. }
{ TreeViewX Library }
{ Version 1.0 }
{ Conversion log:
Hint: Class is not registered. Ambient properties cannot be determined.
}
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
const
LIBID_TreeViewX: TGUID = '{A79D1C3C-3DC8-11D1-82D6-006097319291}';
const
{ TxBorderStyle }
bsNone = 0;
bsSingle = 1;
{ TxDragMode }
dmManual = 0;
dmAutomatic = 1;
{ TxSortType }
stNone = 0;
stData = 1;
stText = 2;
stBoth = 3;
{ TxMouseButton }
mbLeft = 0;
mbRight = 1;
mbMiddle = 2;
const
{ Component class GUIDs }
Class_TreeViewX: TGUID = '{A79D1C3E-3DC8-11D1-82D6-006097319291}';
type
{ Forward declarations: Interfaces }
ITreeViewX = interface;
ITreeViewXDisp = dispinterface;
ITreeViewXEvents = dispinterface;
{ Forward declarations: CoClasses }
TreeViewX = ITreeViewX;
{ Forward declarations: Enums }
TxBorderStyle = TOleEnum;
TxDragMode = TOleEnum;
TxSortType = TOleEnum;
TxMouseButton = TOleEnum;
{ Dispatch interface for TreeView Object }
ITreeViewX = interface(IDispatch)
['{A79D1C3D-3DC8-11D1-82D6-006097319291}']
function Get_BorderStyle: TxBorderStyle; safecall;
procedure Set_BorderStyle(Value: TxBorderStyle); safecall;
function Get_Color: TColor; safecall;
procedure Set_Color(Value: TColor); safecall;
function Get_Ctl3D: WordBool; safecall;
procedure Set_Ctl3D(Value: WordBool); safecall;
function Get_Enabled: WordBool; safecall;
procedure Set_Enabled(Value: WordBool); safecall;
function Get_Font: Font; safecall;
procedure Set_Font(const Value: Font); safecall;
function Get_HideSelection: WordBool; safecall;
procedure Set_HideSelection(Value: WordBool); safecall;
function Get_Indent: Integer; safecall;
procedure Set_Indent(Value: Integer); safecall;
function Get_ReadOnly: WordBool; safecall;
procedure Set_ReadOnly(Value: WordBool); safecall;
function Get_ShowLines: WordBool; safecall;
procedure Set_ShowLines(Value: WordBool); safecall;
function Get_ShowRoot: WordBool; safecall;
procedure Set_ShowRoot(Value: WordBool); safecall;
function Get_SortType: TxSortType; safecall;
procedure Set_SortType(Value: TxSortType); safecall;
function Get_Visible: WordBool; safecall;
procedure Set_Visible(Value: WordBool); safecall;
function Get_ShowButtons: WordBool; safecall;
procedure Set_ShowButtons(Value: WordBool); safecall;
function Get_RightClickSelect: WordBool; safecall;
procedure Set_RightClickSelect(Value: WordBool); safecall;
procedure AddRoot(Index: Integer; const S: WideString); safecall;
procedure AddChild(RootIndex, Index: Integer; const S: WideString); safecall;
function AlphaSort: WordBool; safecall;
procedure Delete; safecall;
procedure FullCollapse; safecall;
procedure FullExpand; safecall;
procedure LoadFromFile(const FileName: WideString); safecall;
procedure SaveToFile(const FileName: WideString); safecall;
function IsEditing: WordBool; safecall;
property BorderStyle: TxBorderStyle read Get_BorderStyle write Set_BorderStyle;
property Color: TColor read Get_Color write Set_Color;
property Ctl3D: WordBool read Get_Ctl3D write Set_Ctl3D;
property Enabled: WordBool read Get_Enabled write Set_Enabled;
property Font: Font read Get_Font write Set_Font;
property HideSelection: WordBool read Get_HideSelection write Set_HideSelection;
property Indent: Integer read Get_Indent write Set_Indent;
property ReadOnly: WordBool read Get_ReadOnly write Set_ReadOnly;
property ShowLines: WordBool read Get_ShowLines write Set_ShowLines;
property ShowRoot: WordBool read Get_ShowRoot write Set_ShowRoot;
property SortType: TxSortType read Get_SortType write Set_SortType;
property Visible: WordBool read Get_Visible write Set_Visible;
property ShowButtons: WordBool read Get_ShowButtons write Set_ShowButtons;
property RightClickSelect: WordBool read Get_RightClickSelect write Set_RightClickSelect;
end;
{ DispInterface declaration for Dual Interface ITreeViewX }
ITreeViewXDisp = dispinterface
['{A79D1C3D-3DC8-11D1-82D6-006097319291}']
property BorderStyle: TxBorderStyle dispid 1;
property Color: TColor dispid 2;
property Ctl3D: WordBool dispid 3;
property Enabled: WordBool dispid 5;
property Font: Font dispid 6;
property HideSelection: WordBool dispid 7;
property Indent: Integer dispid 8;
property ReadOnly: WordBool dispid 9;
property ShowLines: WordBool dispid 11;
property ShowRoot: WordBool dispid 12;
property SortType: TxSortType dispid 13;
property Visible: WordBool dispid 14;
property ShowButtons: WordBool dispid 15;
property RightClickSelect: WordBool dispid 16;
procedure AddRoot(Index: Integer; const S: WideString); dispid 20;
procedure AddChild(RootIndex, Index: Integer; const S: WideString); dispid 21;
function AlphaSort: WordBool; dispid 22;
procedure Delete; dispid 23;
procedure FullCollapse; dispid 24;
procedure FullExpand; dispid 25;
procedure LoadFromFile(const FileName: WideString); dispid 26;
procedure SaveToFile(const FileName: WideString); dispid 27;
function IsEditing: WordBool; dispid 28;
end;
ITreeViewXEvents = dispinterface
['{A79D1C4D-3DC8-11D1-82D6-006097319291}']
procedure OnClick; dispid 3;
procedure OnDblClick; dispid 4;
procedure OnKeyPress(var Key: Smallint); dispid 5;
end;
{ TreeViewObject }
TTreeViewX = class(TOleControl)
private
FIntf: ITreeViewX;
function GetControlInterface: ITreeViewX;
protected
procedure CreateControl;
procedure InitControlData; override;
function GetTOleEnumProp(Index: Integer): TOleEnum;
procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
public
procedure AddRoot(Index: Integer; const S: WideString);
procedure AddChild(RootIndex, Index: Integer; const S: WideString);
function AlphaSort: WordBool;
procedure Delete;
procedure FullCollapse;
procedure FullExpand;
procedure LoadFromFile(const FileName: WideString);
procedure SaveToFile(const FileName: WideString);
function IsEditing: WordBool;
property ControlInterface: ITreeViewX read GetControlInterface;
published
property BorderStyle: TxBorderStyle index 1 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Color: TColor index 2 read GetTColorProp write SetTColorProp stored False;
property Ctl3D: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
property Enabled: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
property Font: TFont index 6 read GetTFontProp write SetTFontProp stored False;
property HideSelection: WordBool index 7 read GetWordBoolProp write SetWordBoolProp stored False;
property Indent: Integer index 8 read GetIntegerProp write SetIntegerProp stored False;
property ReadOnly: WordBool index 9 read GetWordBoolProp write SetWordBoolProp stored False;
property ShowLines: WordBool index 11 read GetWordBoolProp write SetWordBoolProp stored False;
property ShowRoot: WordBool index 12 read GetWordBoolProp write SetWordBoolProp stored False;
property SortType: TxSortType index 13 read GetTOleEnumProp write SetTOleEnumProp stored False;
property Visible: WordBool index 14 read GetWordBoolProp write SetWordBoolProp stored False;
property ShowButtons: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
property RightClickSelect: WordBool index 16 read GetWordBoolProp write SetWordBoolProp stored False;
end;
procedure Register;
implementation
uses ComObj;
procedure TTreeViewX.InitCo